Category: Geeks r Us
Hi all,
I've recently started learning python, and have had quite a bit of success with it so far. I've been using the pygame library for game development, sadly though it's sound module seems very limited, in that you can't adjust pan or volume of the sounds on the fly. I am still learning, so it may be that python will support DirectSound or something similar through com, although I've not seen it in the docs. So I wondered, have any of you got any ideas of how this can be done? Sound adjustment that is.
Thanks in advance, as always, for any help.
Cheers,
Simon
I seem to recall there being an extention for python that supported com. Think it was called something like pywin32? Been ages since I played with python though. The s60 version looks really fun to experiment with on mobile devices, although maybe java would be better. Oh well, going off topic. With pywin32 you can call com objects, so you could get some wrapper like com audio or something and do it that way. There might be a more elegant solution out there.
Hth.
Malthe.
Sweet, I've worked with comm audio with VB6, so that'd be awesome. Better the devil you know and all that. Thanks for that. I too would be interested in doing some stuff for series 60, sadly the last time I tried anything in Java I couldn't do a damn thing with it. I'd love to do games for us blindies for other platforms and devices othe than windows machines you see, hence looking into python and all.
Anyway thanks for that.
Cheers,
Simon
Java, Like I said in the last post...
I'd rather drink drain-o, though that wasn't exactly what I said in the last post.
Maybe sniffing bleach would get me there faster.
Anyway, I really like fmod. It's c++, so you could wrap it in a c dll, and then use that rather than having to mess with comaudio--I noticed it was extremely flakey.
DirectX also supports com, I believe.
Peace!
Yeah it does, my unknown at the time was whether *python* supported com or not. As malth said though, it does, so we're good to go. As soon as I'm all set up there, it's just a simple matter of making a dll in vb6, with any functions i need, and referencing that.
Cheers,
Simon
I'm going to take a risk and suggest you to try fmod. I don't even know if it works with python, but if it did, it could be a good alternative. Look it up on google.
I'm not sure, I'm willing to bet someone has written something for it though, a comm object or something. Since I wrote this topic though I've hit a further snag in being able to compile python code to an executable. Last I looked the program you use to do that doesn't work with the version of python I have. Thinking of persevering with vb.net to be honest.
Thank you all the same for all your input though folks.
Cheers,
Simon
Hey,
There was once a python wrapper for fmod called pysonic (pysonicEx for fmodex). I think the site is pysonic.sf.net or google it. I've tried compiling it under linux but always got some pyrex error or other. Frustrating since pygame+pysonic is totally crossplatform. I'd advise you continue with python as it makes playing games on non-windows OSes a lot easier. Take soundrts: I don't believe the author intended for the game to be crossplatform but since he used pygame (with the default crappy mixer functionality) it worked without a hitch on linux and mac OS X. (btw, it must be possible to pan sounds in realitme w/ pygame.mixer - I believe soundrts has that functionality) Mono can apparently run .net apps on linux and mac, but there are complications (plus it's only theoretical as far as I'm concerned; never tested it or tried it myself). Python +pygame/sdl is good.